package com.example.springboot.base;


/**
 * 返回对象枚举类型
 *
 * <p>
 * @author Zhang.Z
 * @version 2025-09-20
 */
public enum ResultEnum {
	// 成功
	SUCCESS(200, "成功"),

	// token异常
	TOKEN_PAST(301, "登录过期"), TOKEN_ERROR(302, "token异常"),
	// 登录异常
	LOGIN_ERROR(303, "请重新登录"), REMOTE_ERROR(304, "异地登录"),
	// 鉴权异常
	AUTHORIZE_ERROR(305, "鉴权失败"), AUTHORIZE_SCARCITY(306, "权限不足"),


	// 错误
	ERROR(999, "系统错误，请联系管理员"),

	;

	private final Integer code;

	private final String desc;

	ResultEnum(Integer code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public Integer getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
}
